﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="AccountManagement.aspx.cs" Inherits="AccountManagement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="page">
        <%--page division--%>
        <div id="div1" class="style1" style="text-align: right; height: 50px;">
            <%--top division--%><%--This division contains the labels, text boxes, and regex validators for the user's email and password--%>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="idBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="idLbl" runat="server" CssClass="style3">User ID</asp:Label>
            <asp:TextBox ID="idBx" runat="server" Width="700px"></asp:TextBox>
            <%--<asp:RegularExpressionValidator ID="regEmail" runat="server" ControlToValidate="emailBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$" />
            --%><br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="passwdBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="passwd" runat="server" CssClass="style3">Password</asp:Label>
            <asp:TextBox ID="passwdBx" runat="server" Width="700px"></asp:TextBox>
        </div>
        <%--button to check if a user is already registered--%>
        <br />
        <div style="width: 696px; margin-left: 236px; margin-right: 0px">
            <asp:Button ID="updateBtn" runat="server" Height="41px" Text="Click here to update any changes made"
                Width="334px" OnClick="updateBtn_Click" Style="margin-left: 0px" CssClass="button rounded-corners" />
            &nbsp;&nbsp;&nbsp;
            <asp:Button ID="alreadyInBtn" runat="server" Height="41px" Text="Click here to check if that ID already exists"
                Width="334px" OnClick="alreadyInBtn_Click" Style="margin-left: 0px" CausesValidation="False" CssClass="button rounded-corners" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
        <br />
        <div id="div2" class="style2" style="text-align: right">
            <%--bottom division--%><%--This division contains the labels, text boxes, and regex validators for the user's first name, last name,
            social, house number, street, city, state, and zip--%>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="firstNameBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="firstName" runat="server" CssClass="style3" Text="First Name"></asp:Label>
            <asp:TextBox ID="firstNameBx" runat="server" Width="700px"></asp:TextBox>
            <%--<asp:RegularExpressionValidator ID="regFirstname" runat="server" ControlToValidate="firstNameBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^[a-zA-Z''-'\s]{1,40}$" />--%>
            <br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="lastNameBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="lastName" runat="server" CssClass="style3" Text="Last Name"></asp:Label>
            <asp:TextBox ID="lastNameBx" runat="server" Width="700px"></asp:TextBox>
            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="emailBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="emailLbl" runat="server" CssClass="style3" Text="Email address"></asp:Label>
            <asp:TextBox ID="emailBx" runat="server" Width="700px"></asp:TextBox>
            <%--<asp:RegularExpressionValidator ID="regLastname" runat="server" ControlToValidate="lastNameBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^[a-zA-Z''-'\s]{1,40}$" />--%>
            <br class="style3" />
            
            <div id="listValDiv" runat="server" 
                style="text-align: center; margin-top: 10px"><asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="btnList"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator></div>
            <div id="listLblDiv" runat="server" 
                style="text-align: center; margin-top: 2px; margin-bottom: 20px">
                <asp:Label ID="Social" runat="server" CssClass="style3" Text="Select if you are a Buyer or a Seller: "></asp:Label></div>
                <div id="listDiv" runat="server" 
                style="text-align: center; margin-left: 387px; margin-right: 388px"><asp:RadioButtonList
                    ID="btnList" runat="server" RepeatDirection="Horizontal" 
                        style="margin-bottom: 0px" Width="166px">
                    <asp:ListItem Value="B">Buyer</asp:ListItem>
                    <asp:ListItem Value="S">Seller</asp:ListItem>
                </asp:RadioButtonList></div>
            
            <%--<asp:RegularExpressionValidator ID="regSocial" runat="server" ControlToValidate="SocialBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^(\d{3}-\d{2}-\d{4})$|(\d{3}\d{2}\d{4})$" />
            --%><br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="addressBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="Address" runat="server" CssClass="style3" Text="Address #"></asp:Label>
            <asp:TextBox ID="addressBx" runat="server" Width="700px"></asp:TextBox>&nbsp;
            <asp:CompareValidator id="CompareValidator1" runat="server" ErrorMessage="You have to write an integer value" ControlToValidate="addressBx" Type="Integer" Operator="DataTypeCheck"></asp:CompareValidator>
            <%--asp:RegularExpressionValidator ID="regAddress" runat="server" ControlToValidate="AddressBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="/^\d{5}$/" />--%>
            <br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="streetBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="Street" runat="server" CssClass="style3" Text="Address Street"></asp:Label>
            <asp:TextBox ID="streetBx" runat="server" Width="700px"></asp:TextBox>&nbsp;
            
            <%--<asp:RegularExpressionValidator ID="regStreet" runat="server" ControlToValidate="StreetBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^[a-zA-Z''-'\s]{1,40}$" />--%>
            <br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="cityBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="City" runat="server" CssClass="style3" Text="Address City"></asp:Label>
            <asp:TextBox ID="cityBx" runat="server" Width="700px"></asp:TextBox>
            <%--<asp:RegularExpressionValidator ID="regCity" runat="server" ControlToValidate="CityBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^[a-zA-Z''-'\s]{1,40}$" />--%>
            <br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="stateBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="State" runat="server" CssClass="style3" Text="State"></asp:Label>
            <asp:TextBox ID="stateBx" runat="server" Width="700px"></asp:TextBox>
            <%--<asp:RegularExpressionValidator ID="regState" runat="server" ControlToValidate="StateBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^(A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$" />
            --%><br class="style3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="zipBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="Zip" runat="server" CssClass="style3" Text="Zip Code"></asp:Label>
            <asp:TextBox ID="zipBx" runat="server" Width="700px"></asp:TextBox>
            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="countryBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="countryLbl" runat="server" CssClass="style3" Text="Country"></asp:Label>
            <asp:TextBox ID="countryBx" runat="server" Width="700px"></asp:TextBox>
            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="phoneBx"
                ErrorMessage="Required field  "></asp:RequiredFieldValidator>
            <asp:Label ID="phoneLbl" runat="server" CssClass="style3" Text="Phone"></asp:Label>
            <asp:TextBox ID="phoneBx" runat="server" Width="700px"></asp:TextBox>
            <%--<asp:RegularExpressionValidator ID="regZip" runat="server" ControlToValidate="ZipBx"
                CssClass="style3" Display="Dynamic" ErrorMessage="input error!" ValidationExpression="^(\d{5}-\d{4}|\d{5}|\d{9})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$" />
            --%></div>
        <p style="margin-left: 80px; width: 852px; text-align: left;">
            <%--register button--%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="regBtn" runat="server" Height="31px" Text="Register" Width="213px"
                OnClick="regBtn_Click" CssClass="button rounded-corners" />
            &nbsp;&nbsp;&nbsp;
            <%--update button--%>&nbsp;&nbsp;&nbsp;
            <%--back button--%>
            <asp:Button ID="backBtn" runat="server" Height="31px" OnClick="backBtn_Click" Text="Back to Main Page"
                Width="213px" CausesValidation="False" CssClass="button rounded-corners" />
        </p>
    </div>
</asp:Content>
